#ifndef __TEXTURE_H__
#define __TEXTURE_H__

#include <d3d9.h>
#include <d3dx9.h>
#include "Trace.h"


class Texture
{
private:
	LPWSTR _fileName;
	LPDIRECT3DTEXTURE9 _texture;
	LPDIRECT3DDEVICE9 _d3ddv;
	D3DCOLOR _transcolor;
	
	

public:
	int _Cols;			// Number of sprites per row
	int _Rows;
	int _Count;			// Number of sprites

	float _Width;			// Sprite width
	float _Height;		// Sprite height

	Texture( LPDIRECT3DDEVICE9 D3ddv, LPWSTR FileName, int Cols, int Rows, int Count, D3DCOLOR Transcolor);
	~Texture();

	void SetDevice(LPDIRECT3DDEVICE9 D3ddv) { _d3ddv = D3ddv;}
	LPDIRECT3DTEXTURE9 Get_Texture() {return _texture;}
	LPWSTR GetFileName() {return _fileName;}

	int getCols()  { return _Cols; }

	int getRows()  { return _Rows; }
	
	int getCount() const { return _Count; }
	
	float getWidth()  { return _Width; }
	
	float getHeight()  { return _Height; }
	

	void Load();
};
#endif